package pattern.factory.factorymethod;

import pattern.factory.ICourse;

/**
 * 工厂方法示例
 * @author: jxj
 * @create: 2019-04-19
 **/
public class FactoryMethodTest {
    public static void main(String[] args) {
        JavaCourseFactory javaCourseFactory=new JavaCourseFactory();
        ICourse javaCourse=javaCourseFactory.create();
        javaCourse.record();

        PythonCourseFactory pythonCourseFactory=new PythonCourseFactory();
        ICourse pythonCourse=pythonCourseFactory.create();
        pythonCourse.record();
    }
}
